import statRouter from './statRouter';
import systemRouter from './systemRouter';
import adminLayout from '@/layout/admin/index';
import commonLayout from '@/layout/admin/common';

export default [{
	path: '/admin',
	name: 'Admin',
	redirect: '/index',
	meta: {
		title: '首页'
	},
	component: adminLayout,
	children: [{
			path: '/index',
			name: 'Index',
			meta: {},
			component: () => import('@/views/index/index')
		},
		{
			path: '/dataConfig',
			name: 'Dataconfig',
			meta: {
				title: '数据配置'
			},
			component: () => import("@/views/admin/dataConfig/index")
		}, {
			path: '/maintain',
			name: 'Maintain',
			meta: {
				title: '运行维护管理'
			},
			component: () => import('@/views/admin/maintain/index')
		}, {
			path: '/schedule',
			name: 'Schedule',
			meta: {
				title: '运行维护管理'
			},
			component: () => import('@/views/admin/schedule/index')
		}, {
			path: '/mailManage',
			name: 'Mailmanage',
			meta: {
				title: '邮件管理'
			},
			redirect: '/mailManage/records',
			component: commonLayout,
			children: [{
				path: 'records',
				name: 'MailmanageRecords',
				meta: {
					title: '邮件数据'
				},
				component: () => import('@/views/admin/mailManage/records/index')
			}, {
				path: 'records/:id',
				name: 'MailmanageRecordsDetail',
				meta: {
					title: '邮件详情'
				},
				component: () => import('@/views/admin/mailManage/records/detail')
			}, {
				path: 'achievement',
				name: 'MailmanageAchievement',
				meta: {
					title: '成果提醒'
				},
				component: () => import('@/views/admin/mailManage/achievement/index')
			}, {
				path: 'feedback',
				name: 'MailmanageFeedback',
				meta: {
					title: '反馈提醒'
				},
				component: () => import('@/views/admin/mailManage/feedback/index')
			}]
		}, {
			path: '/question',
			name: 'Question',
			meta: {},
			component: () => import('@/views/question/index')
		}, {
			path: "/commonQuestion",
			name: "Commonquestion",
			meta: {
				title: "问题管理"
			},
			component: () => import("@/views/admin/faq/index")
		}, {
			path: "/commonQuestion/:id",
			name: "CommonQuestionDetail",
			meta: {},
			component: () => import("@/views/admin/faq/detail")
		}, {
			path: '/announcement',
			name: 'Announcement',
			meta: {
				title: '通知公告'
			},
			redirect: '/announcement/list',
			component: () => import('@/views/announcement/index'),
			children: [{
				path: 'list',
				name: 'Announcementlist',
				meta: {
					title: '通知公告'
				},
				component: () => import('@/views/announcement/list')
			}, {
				path: ':id',
				name: 'Announcementdetail',
				meta: {
					title: '通知公告'
				},
				component: () => import('@/views/announcement/detail')
			}]
		},
		...statRouter,
		...systemRouter
	]
}]